package com.csi.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 评价表
 */
@Data
@Schema(description = "用户评价信息模型")
public class UserAssess {

    @Schema(description = "评价记录的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private long id; // 评价id

    @Schema(description = "评价信息内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "房间整洁，服务周到。")
    private String assessInfo; // 评价信息

    @Schema(description = "评价图片URL（可以是多个图片链接，用逗号分隔）", example = "https://example.com/images/assess_1.jpg,https://example.com/images/assess_2.jpg")
    private String assessImage; // 评价图片

    @Schema(description = "评分（满分5分）", requiredMode = Schema.RequiredMode.REQUIRED, example = "4.5", type = "number", format = "float")
    private BigDecimal score; // 评分

    @Schema(description = "评价日期", requiredMode = Schema.RequiredMode.REQUIRED, type = "string", format = "date-time", example = "2024-12-03T11:21:00.000+08:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Timestamp assessDate; // 评价日期

    @Schema(description = "关联的用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private long userId; // 用户id

    @Schema(description = "关联的预定ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3")
    private long dueId; // 预定id

    @Schema(description = "评论的用户", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    private User user;
}